#+TITLE: Guile Hall GNU Guix Package
#+AUTHOR: Zelphir Kaltstahl
#+STARTUP: content indent align inlineimages hideblocks entitiesplain nologdone nologreschedule nologredeadline nologrefile
#+TODO: TODO INPROGRESS | DONE CANCELLED
#+DATE: <2021-02-06 Sa>
#+LANGUAGE: English
#+PRIORITIES: A E E

* Guide

** Converting an existing project

#+begin_src shell
hall init --convert --author AUTHOR_NAME --prefix SOURCE_DIR --license LICENSE_NAME PROJECT_NAME --execute
#+end_src

*** Explanation

- ~hall~: executable of ~guile-hall~
- ~init~: subcommand of ~hall~ which initiates a project, either creating a completely new project, or converting an existing project
- ~--author~: allows to specify the author of the project
- ~--prefix~: the directory, which is the top level directory of you source code
- ~--license~: the license name, which ~hall~ will translate to a license text in a license file called ~COPYING~
- ~--execute~: tells ~guile-hall~ to not only dry-run, but actually perform the changes, which conversely means leaving away ~--execute~ results in a dry-run, displaying the changes, which ~guile~hall~ would perform

*** Result

~guile-hall~ will create typical files one might need when making a GNU Guix package. You might need to adapt a few of the values in ~hall.scm~, as they can be incorrect for existing projects, which do not exactly follow the file structure ~guile-hall~ assumes.

For example the ~hall init~ command does not check, whether its assumptions about where your tests are located is correct. It assumes them to be in ~tests/~, but you might have them in ~test/~.

A lot of the defaults will probably not match your project's structure and you will have to adapt the corresponding values.

*** Steps after converting a project

- ~guix.scm~
  - Check if the license file is correct, or you have multiple license files in your project now.
  - Correct the version number in ~guix.scm~.
  - Correct the ~source~ attribute in ~guix.scm~, according to the version number.
  - Write a synopsis in the ~synopsis~ field.
  - Write a description in the ~description~ field.
  - Check if the ~license~ field has the correct license name.
- ~hall.scm~
  - Correct the version number field ~version~ in ~hall.scm~.
  - Write a synopsis in the ~synopsis~ field.
  - Write a description in the ~description~ field.
  - Check if the ~license~ field has the correct license name.
  - Correct the ~libraries~ value.
  - Correct the ~tests~ value.
